﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Smart.Permission
{
    public class Login : Service.ServiceAction
    {
        protected override Service.IServiceResult DefaultExecute(Service.IServiceRequest request, Service.IServiceResult result)
        {
            var model = Smart.IocRegistry.GetObject<Smart.Data.Model.DataTableModel>("login_model");
            var data = model.Query(request["filter"]);
            if (data.Rows.Count < 1)
            {
                result.Message.Status = -1;
                result.Message.Add("failure");
            }

            return result;
        }
    }
}
